package com.analog.mserver.domain.user;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.analog.mserver.domain.base.BaseEntity;
import com.analog.mserver.domain.user.RoleEntity;
import com.analog.mserver.domain.user.UserEntity;

@Entity
@Table(name = "sys_user_role")
public class UserRoleEntity extends BaseEntity {
	private static final long serialVersionUID = -3661607445171832445L;

	@ManyToOne
	@JoinColumn(name = "user_id")
	private UserEntity user;
	@ManyToOne
	@JoinColumn(name = "role_id")
	private RoleEntity role;
	public UserEntity getUser() {
		return user;
	}
	public void setUser(UserEntity user) {
		this.user = user;
	}
	public RoleEntity getRole() {
		return role;
	}
	public void setRole(RoleEntity role) {
		this.role = role;
	}

}
